package com.zhoutao123.hephaestus.repository;

import com.zhoutao123.hephaestus.repository.dao.SysResourcesMapper;
import com.zhoutao123.hephaestus.repository.entity.SysResources;
import com.zhoutao123.hephaestus.repository.entity.SysResourcesExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SysResourcesRepo
        extends MyBatisGeneratedRepo<
        SysResourcesExample, SysResourcesExample.Criteria, SysResources, SysResources> {

    @Autowired
    private SysResourcesMapper mapper;

    @Override
    Mapper<SysResourcesExample, SysResources, SysResources> getMapper() {
        return new Mapper<SysResourcesExample, SysResources, SysResources>() {
            @Override
            public long countByExample(SysResourcesExample sysResourcesExample) {
                return mapper.countByExample(sysResourcesExample);
            }

            @Override
            public int insert(SysResources sysResources) {
                return mapper.insert(sysResources);
            }

            @Override
            public int insertSelective(SysResources sysResources) {
                return mapper.insertSelective(sysResources);
            }

            @Override
            public int deleteByExample(SysResourcesExample sysResourcesExample) {
                return mapper.deleteByExample(sysResourcesExample);
            }

            @Override
            public int updateByPrimaryKey(SysResources sysResources) {
                return mapper.updateByPrimaryKey(sysResources);
            }

            @Override
            public int updateByPrimaryKeySelective(SysResources sysResources) {
                return mapper.updateByPrimaryKey(sysResources);
            }

            @Override
            public int updateByExample(
                    SysResources sysResources, SysResourcesExample sysResourcesExample) {
                return mapper.updateByExample(sysResources, sysResourcesExample);
            }

            @Override
            public int updateByExampleSelective(
                    SysResources sysResources, SysResourcesExample sysResourcesExample) {
                return mapper.updateByExampleSelective(sysResources, sysResourcesExample);
            }

            @Override
            public List<SysResources> selectByExample(SysResourcesExample sysResourcesExample) {
                return mapper.selectByExample(sysResourcesExample);
            }
        };
    }

    @Override
    SysResourcesExample createExample() {
        return new SysResourcesExample();
    }

    @Override
    SysResourcesExample.Criteria createCriteria(SysResourcesExample sysResourcesExample) {
        return sysResourcesExample.createCriteria();
    }
}
